﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


using FXnaWpfBase;

using ASApplication;

using FXnaAppBaseWpf;


namespace ASPresentation
{
    public class TvProjectViewModel : MDTVIViewModel
    {


        public TvProjectViewModel(MDTVIViewModel parent)
            : base(parent)
        {

            this._project = ProjectService.CurrentService.Project;

            this.LoadChildren();


        }


        Project _project;


        public override string Desc
        {
            get
            {
                return "项目(" + ProjectService.CurrentService.GetProjName() + ")";
            }
        }



        protected override void LoadChildren()
        {
            base.LoadChildren();





            //通用数据，位图，矢量图等




            BitmapCollecionViewModel bitmap = new BitmapCollecionViewModel(this, this._project.CommonData.Images);

            this.Children.Add(bitmap);


            //矢量图数据

            VectorImageCollectionVM vectors = new VectorImageCollectionVM(this,this._project.CommonData.VectorLayers);

            this.Children.Add(vectors);



            //全局选项

            TvGlobalOptionVM global = new TvGlobalOptionVM(this);
            this.Children.Add(global);




            //气象数据

            TvAermetVM aermet = new TvAermetVM(this);

            this.Children.Add(aermet);


            



            //污染源
            TvSourcesVM sources = new TvSourcesVM(this);

            this.Children.Add(sources);


     


            //计算模型

            TvModelCollection model = new TvModelCollection(this,this._project.ModelData);

            this.Children.Add(model);







        }



    }
}
